﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Solidi
{
	public class DependencyContextDecorator : IDependencyContext
	{
		private IDependencyContext _context;

		public DependencyContextDecorator(IDependencyContext context)
		{
			_context = context;
		}

		public virtual object Id
		{
			get
			{
				return _context.Id;
			}
		}

		public virtual IDependencyLifetime Lifetime
		{
			get
			{
				return _context.Lifetime;
			}
		}

		public virtual IDependencyResolver Resolver
		{
			get
			{
				return _context.Resolver;
			}
		}

		public virtual IDependencyRegistry Registry
		{
			get
			{
				return _context.Registry;
			}
		}

		public virtual object Resolve(IDependencyKey key)
		{
			return Resolver.Resolve(this, key);
		}

		public virtual void Dispose()
		{
			_context.Dispose();
		}
	}
}
